import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=3;
        book[] books=new book[n];
        String[] names={"Java程序设计","数据结构","C++程序设计"};
        double[] prices={34.5,44.8,35.0};
        for(int i=0;i<n;i++){
            books[i]=new book(names[i],prices[i]);
        }
    for(book x:books)
    System.out.println(x);
    System.out.println("图书总册数为："+book.sum);
    }

}
class book{
    String name;
    double price;
    int number;
    static int sum;
    {
        sum++;
        number=sum;
    }
    public book(String name,double price) {
        this.name = name;
        this.price = price;
    }

    @Override
    public String toString() {
        return "书名："+name+", 书号："+number+", 书价："+(float)(price);
    }

}